#ifndef DIANCAN_1_H
#define DIANCAN_1_H

#include <QMainWindow>
#include <QPushButton>
#include <QStandardItemModel>
#include <QString>
#include <QDebug>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QVariantList>
#include <QtNetwork/QTcpSocket>
namespace Ui {
class diancan_1;
}

class diancan_1 : public QMainWindow
{
    Q_OBJECT

public:
    explicit diancan_1(QWidget *parent = nullptr);
    ~diancan_1();
    void huifu();
public slots:
    void test();
    void addline();
    void mysql_init();
    void cilent_init();
    int danhao();       //返回单号
    int sum_add();      //单号增加

signals:
    void mySignal();

private slots:
    void on_pushButton_0_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

private:
    Ui::diancan_1 *ui;
    QPushButton* a;
    QStandardItemModel* model;
    QTcpSocket* m_sokcket;
    int row;
    int sum;    //单号

};

#endif // DIANCAN_1_H
